package com.example.jdcompetition.Service.cvsPro.jd;

import com.example.jdcompetition.Component.CsvPaths;
import com.example.jdcompetition.Service.cvsPro.dataprocess.CsvProcess;

import java.io.IOException;
import java.nio.file.Paths;

/**
 * @author henrydai
 * @date 2021/6/17 10:13
 */
@Deprecated
public class CollectRunnable implements Runnable{
    private CsvPaths paths;
    CollectRunnable(CsvPaths paths)
    {
        this.paths=paths;
    }
    @Override
    public void run() {
        //*******************************处理揽收文件***********************
        //处理文件得到的揽收信息集合
        //处理第1个揽收文件
        try {
            new CsvProcess().solveCollect(Paths.get(paths.getFilePath(),paths.getCollectFile1()),paths.getCharsetName1());
            //处理第2个揽收文件
            new CsvProcess().solveCollect(Paths.get(paths.getFilePath(),paths.getCollectFile2()),paths.getCharsetName1());
            //处理第3个揽收文件
            new CsvProcess().solveCollect(Paths.get(paths.getFilePath(),paths.getCollectFile3()),paths.getCharsetName1());
        } catch (Exception e) {
            e.printStackTrace();
        }
        //*******************************处理揽收文件***********************
    }
}
